package com.midian.service.sys;

import com.midian.common.exception.BizException;
import com.midian.model.sys.ValidateCode;
import com.midian.service.common.IBaseService;

/**
 * 验证码业务
 * @author Mengfh
 *
 */
public interface IValidateCodeService extends IBaseService<ValidateCode> {
	/**发送验证码，1:注册*/
	public static final String CODE_REGIST = "1";
	/**发送验证码，2:忘记密码*/
	public static final String CODE_FORGETPW = "2";
	/**发送验证码，3:修改手机号*/
	public static final String UPDATE_PHONE = "3";
	/**发送验证码，4:修改密码*/
	public static final String UPDATE_PWD = "4";
	
	

	public boolean isExistCode(String phone, String code)  throws BizException;
	public boolean isExistCodeAndDelete(String phone, String code)  throws BizException;
	
	public void saveOrUpdateCode(String phone, String code) throws BizException;
}
